package com.nuonuo.middleware.properties.properties;

import com.nuonuo.middleware.drs.spring.context.annotation.DrsConfigurationProperties;
import com.nuonuo.middleware.drs.spring.core.env.PropertyType;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author duan
 * @version 1.0
 * @date 2023/6/5 19:47
 */
@Component
@DrsConfigurationProperties(prefix = "plane.southern-airlines",  groupId = "testBBB", dataId = "testAAA", dataType = PropertyType.YML)
//@DrsConfigurationProperties(prefix = "plane.southernAirlines",  groupId = "testBBB", dataId = "testAAA", dataType = PropertyType.YML)
//@ConfigurationProperties(prefix = "plane.southernAirlines")
public class PlaneProperties {

    private String url;

    private int timeout;

    private int order;

    private String ticketRegex;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getTimeout() {
        return timeout;
    }

    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public String getTicketRegex() {
        return ticketRegex;
    }

    public void setTicketRegex(String ticketRegex) {
        this.ticketRegex = ticketRegex;
    }

    @Override
    public String toString() {
        return "PlaneProperties{" +
                "url='" + url + '\'' +
                ", timeout=" + timeout +
                ", order=" + order +
                ", ticketRegex='" + ticketRegex + '\'' +
                '}';
    }
}
